const { ActionHandler } = require('../lib/mvcEntity.js');
const BaseController = require('../controller/baseController.js');
const mvcUtil = require('../lib/mvcUtil.js');

const simpleMapper = {
    "hello":new ActionHandler(function(request,response){
        let test1 = mvcUtil.getParameter(request,"test1",null);
        let test2 = mvcUtil.getParameter(request,"test2",null);
        mvcUtil.writeJSONResponse(response,"200","Hello:test1="+test1+";test2="+test2+";");
    })
    
};

const serialPortController = new BaseController("simpleController",simpleMapper);

module.exports = serialPortController;